﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Composite.Modularity;
using MP3Ganizer.Common.BaseObject;
using MP3Ganizer.Modules.Infrastructure.Controllers;
using MP3Ganizer.BusinessObject.Services.Configuration;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Composite.Regions;
using MP3Ganizer.BusinessObject.Services.Classification;
using MP3Ganizer.BusinessObject.Services.IO;
using MP3Ganizer.Controls.Message;

namespace MP3Ganizer.Modules.Infrastructure
{
    [Module(ModuleName = "InfrastructuresModule")]
    public class InfrastructureModule : BaseModule<InfrastructureController>
    {
        public InfrastructureModule(IUnityContainer container, IRegionManager regionManager)
            : base(container, regionManager)
        {

        }
        public override void Initialize()
        {
            base.Initialize();
        }
        protected override void RegisterResources()
        {
            base.RegisterResources();
        }
        protected override void RegisterViewsAndServices()
        {
            Container.RegisterType<IConfigurationService,ConfigurationService>(new ContainerControlledLifetimeManager());
            Container.RegisterType<IClassificationService, ClassificationService>(new ContainerControlledLifetimeManager());
            Container.RegisterType<IFileService, FileService>(new ContainerControlledLifetimeManager());
            Container.RegisterType<MessageManager>(new ContainerControlledLifetimeManager());
        }
    }
}